//
//  SettingPlusController.m
//  QuickCure1
//
//  Created by zhouxuanhe on 16/11/1.
//  Copyright © 2016年 maoge. All rights reserved.
//

#import "SettingPlusController.h"
#import "AFNetworking.h"
@interface SettingPlusController ()

@end

@implementation SettingPlusController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupUI];
}

#pragma mark -
#pragma mark - 初始化界面
-(void)setupUI
{
    UIWebView *webview = [[UIWebView alloc] init];
    
    
    NSURL *url = [NSURL URLWithString:@"https://www.baidu.com"];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [webview loadRequest:request];
    [self.view addSubview:webview];
    
    //约束
    [webview mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(self.view);
    }];
}

//访问网络
-(void)callNetwork{
 NSString *url = @"https://www.baidu.com";
 AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    
    [manager POST:url parameters:0 progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        
    }];
 
// 
// NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
// 
// NSLog(@"%@", dict);
 
// NSLog(@"request fail");
// 
// }];
}

@end
